using System;
using System.Data;
using System.Configuration;
using System.Web.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Cashflow
{
	public class CashflowSection : ConfigurationSection
	{
		[ConfigurationProperty("connectionStringName", DefaultValue = "LocalSqlServer")]
		public string ConnectionStringName
		{
			get { return (string)base["connectionStringName"]; }
			set { base["connectionStringName"] = value; }
		}

		public string ConnectionString
		{
			get
			{
				return WebConfigurationManager.ConnectionStrings[ConnectionStringName].ConnectionString;
			}
		}

		[ConfigurationProperty("enableCaching", DefaultValue = "true")]
		public bool EnableCaching
		{
			get { return (bool)base["enableCaching"]; }
			set { base["enableCaching"] = value; }
		}

		[ConfigurationProperty("cacheDuration", DefaultValue = "600")]
		public int CacheDuration
		{
			get { return (int)base["cacheDuration"]; }
			set { base["cacheDuration"] = value; }
		}
	}
}